/* ----------------------------------------------------------------------------
* File: event_sink.h
*
* Desc: Event sink interface
*
* Created: 21/07/2011, by Alexey Korshunov
* ---------------------------------------------------------------------------- */
#ifndef _EVENT_SINK_H_
#define _EVENT_SINK_H_

#include "skype_proxy_impl.h"
#define IID_EVENT_SINK		1


namespace SkypeProxyManagement
{
	class EventSink : public SkypeProxyEventSink<IID_EVENT_SINK, EventSink>
	{
	public:
		explicit EventSink(SkypeEventHandler* handler);

		// Event dispatching
		void __stdcall Command(SKYPE4COMLib::ICommand* pCommand);
		void __stdcall Reply(SKYPE4COMLib::ICommand* pCommand);
		void __stdcall Error(SKYPE4COMLib::ICommand* pCommand, LONG Number, BSTR Description);
		void __stdcall AttachmentStatus(SKYPE4COMLib::TAttachmentStatus Status);
		void __stdcall ConnectionStatus(SKYPE4COMLib::TConnectionStatus Status);
		void __stdcall UserStatus(SKYPE4COMLib::TUserStatus Status);
		void __stdcall OnlineStatus(SKYPE4COMLib::IUser* pUser, SKYPE4COMLib::TOnlineStatus Status);
		void __stdcall CallStatus(SKYPE4COMLib::ICall* pCall, SKYPE4COMLib::TCallStatus Status);
		void __stdcall CallHistory();
		void __stdcall Mute(VARIANT_BOOL Status);
		void __stdcall MessageStatus(SKYPE4COMLib::IChatMessage* pMessage, SKYPE4COMLib::TChatMessageStatus Status);
		void __stdcall MessageHistory(BSTR Username);

		BEGIN_SINK_MAP(EventSink)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 1, &Command,  &CommandInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 2, &Reply,  &ReplyInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 3, &Error,  &ErrorInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 4, &AttachmentStatus, &AttachmentStatusInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 5, &ConnectionStatus,  &ConnectionStatusInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 6, &UserStatus,  &UserStatusInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 7, &OnlineStatus,  &OnlineStatusInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 8, &CallStatus,  &CallStatusInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 10, &Mute,  &MuteInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 11, &MessageStatus,  &MessageStatusInfo)
			SINK_ENTRY_INFO(IID_EVENT_SINK, __uuidof(SKYPE4COMLib::_ISkypeEvents), 12, &MessageHistory,  &MessageHistoryInfo)		
		END_SINK_MAP()

	private:
		SkypeEventHandler* m_SkypeHandler;
	};
}


#endif // _EVENT_SINK_H_